package cn.event;


import org.springframework.stereotype.Component;
import org.springframework.context.ApplicationListener;
@Component
public class DemoListener implements ApplicationListener<DemoEvent>{
    public void onApplicationEvent(DemoEvent event){
        String message = event.getMessage();
        System.out.println("DemoListener收到消息: "+ message);
    }
}
